<?php 

// Verifica el cambio de idioma
  if (isset($_GET['leng'])):
	$lenguaje = $_GET['leng'];
  elseif(isset($_COOKIE["lenguaje"])): 
  	$lenguaje = $_COOKIE["lenguaje"];
  else:
  	$lenguaje = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'],0,2);
  endif;
  // Crea la cookie con el valor seleccionado
  setcookie( "lenguaje", $lenguaje, (time()+60*60*24*10), "/");
  
  switch($lenguaje): // Selecion de lenguaje de la apliacion
	case 'es': include_once('includes/fk_php/lenguaje_es(v2).php'); break;
	case 'en': include_once('includes/fk_php/lenguaje_es(v2).php');break;
	default: include_once('includes/fk_php/lenguaje_es(v2).php'); break;
  endswitch;

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="Keywords" content="<?=Meta_keyword?>" />
    <meta name="Description" content="<?=Meta_description?>" />
    <meta name="SYSCORR" content="<?=Meta_description?>" />
<title><?=Tile_sisname?></title>

  <!-- Common Styles for the examples -->
  <link rel="stylesheet" type="text/css" href="includes/extjs/resources/css/ext-all.css" />
  <!-- LIBS -->
  <script type="text/javascript" src="includes/extjs/adapter/ext/ext-base.js"></script>
  <!-- ENDLIBS -->
  <script type="text/javascript" src="includes/extjs/ext-all.js"></script>
	<link href="style/style.css" rel="stylesheet" type="text/css">
	  <script type="text/javascript">
  Ext.BLANK_IMAGE_URL = 'includes/extjs/resources/images/default/s.gif';
  
	function msgerror(opc){
	//funcion llamada desde  mod_login.php
	switch(opc){
	  case "novalido"	: 
	  case "noexiste"	:
	  case "password"	: js_msg = opc+'<br /><?=MgsLogin_005?><br /><?=MgsLogin_004?>'; break;
	  case "duplicado"	: js_msg = opc+'<br /><?=MgsLogin_001?>'; break;
	  case "sancionado"	: js_msg = opc+'<br /><?=MgsLogin_017?>'; break;
	  case "bloqueado"	: js_msg = opc+'<br /><?=MgsLogin_016?>'; break;
	  case "vigencia"	: js_msg = opc+'<br /><?=MgsLogin_018?>'; break;
	}		
		
	Ext.MessageBox.show({
		   title: '<?=Title_error?>!!!',
		   msg: js_msg, // Mensaje
		   buttons: Ext.MessageBox.OK,
		   animEl: 'button_entrar',
		   icon: Ext.MessageBox.ERROR
	   });
	}
</script>

</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellpadding="0" cellspacing="0" height="100%">
  <tr> 
	<td height="70" valign="top" class="bgHead"> 
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr> 
			  <td width="102" height="65" valign="bottom" class="bgCornerTop"><img src="images/bg_corner_top_2.gif" width="102" height="65"></td>
			  <td height="65" width="250" valign="top" align="center"><div id=""><img src="images/SYSFLOT.gif"  border="1"> &COPY;</div></td>
			  <td align="right" valign="middle"><img src="images/logo1.gif" width="179" height="80" border="0">&COPY;</td>
			</tr>
	  </table>
	</td>
  </tr>
  <tr> 
	<td height="47" valign="top" class="bgMenuBack"><table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr> 
		  <td><img src="images/bg_corner_bot_2.gif" width="121" height="47"> <img src="images/spacer.gif" width="10" height="1"></td>
		</tr>
	  </table></td>
  </tr>
  <!-- CUERPO DEL TRABAJO-->
  <tr>
	<td align="center" valign="top" class="bg" style="height:460px">
	<br>
<form id="form1" name="form1" method="post" action="mod_login.php" target="iframe_login">
	<table width="300" border="0" cellpadding="3" cellspacing="1" >
			  <tr align="center"> 
				<th colspan=2 ><span class="basicTitle">Acceso de Usuarios</span></th>
			 </tr>
			  <tr> 
				<th>
					<strong><?=Title_usuario?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</strong>
				</th>
				<th> 
					<input id="textfield_usuario" name="textfield_usuario" title="<?=Title_usuario?>" type="text" style="width: 150px" size="10" maxlength="25">
				</th>
			</tr>
			  <tr> 
				<th>
					<strong><?=Title_contrasena?> :</strong>
				</th>
				<th> 
					<input type="password"  name="textfield_pass" title="<?=Title_contrasena?>" id="textfield_pass" style="width: 150px" size="10" maxlength="15">
				</th>
			</tr>
			<tr> 
				<th align="center" colspan="2"> 
				  <center><input type="submit" class="mainButton" name="button_entrar" id="button_entrar" value="<?=Title_entrar?>" title="<?=Title_entrar?>"></center>
				</th>
			</tr>
		  </table>
</form>
	</td>
  </tr>
  <tr>
  <td class="bg" style="height:43px">
	&nbsp;
  </td>
  </tr>
  <tr> 
	<td height="20" align="right" class="bgFooter" style="height:20px"></td>
  </tr>
  <tr> 
	<td height="20" align="center" class="bgCopyright" style="height:20px">
		<b><?=Title_piepag?></b>
	</td>
  </tr>
</table>
<iframe id="iframe_login" name="iframe_login" src="about:blank" height="0px" width="0px" scrolling="no" frameborder="0" BottomMargin="0" LeftMargin="0" RightMargin="0" TopMargin="0" MarginWidth="0" MarginHeight="0"></iframe>
</body>
</html>